home *** CD-ROM | disk | FTP | other *** search
- ' This macro starts a new DesignCAD drawing, then draws a 20 foot
- ' long line, offsets it for an interior wall width, then asks the
- ' user for the door width. It then allows the user to snap to
- ' the bottom of the wall, and uses that point to break the wall.
- ' It breaks a hole in the wall for the width the user wanted,
- ' caps both breaks in the wall, then draws the door symbol with
- ' an angled line and an arc.
- '
- ' Open a new Drawing
- >New
- {
- }
- ' Draw a 20 foot long wall
- >Line
- {
- <pointxyz 0, 0, 0
- <pointpolar 20, 0, 0
- }
- ' Select the entire drawing
- >SelectAll
- {
- }
- ' Offset wall 6 inches
- >Parallel
- {
- <pointxyz 0, 0, 0
- <pointxyz 0, .5, 0
- }
- ' Fit results to Window
- >FitToWindow
- {
- }
- ' Ask User for Door Width, (not thickness)
- ' Un-remark these next 2 lines to make the input box appear in the upper
- ' left corner of the DesignCAD window, so it does not cover the drawing area.
- ' Sys(130) = 5
- ' Sys(131) = 5
- ' Get Distances from user
- Input "What's the Door's Width, (not wall thickness)", wide
- ' Ask user to set a point for the Door's left base point
- setpoint "Snap to the bottom of the wall with the line snap, (K) for the Door's left corner", 1
- ' Get that point the user set
- getxy x1 y1 z1
- ' Cut Wall Section out
- >SectionDeleteCut
- {
- <Pointxyz [x1], [y1 + 5], 0
- <Pointxyz [x1 + wide], [y1 - 5], 0
- }
- ' Cap off the left line
- >Line
- {
- <pointxyz [x1], [y1], 0
- <gravity [x1], [.5], 0
- }
- ' Cap off the right line
- >Line
- {
- <pointxyz [x1+wide], [y1], 0
- <gravity [x1+wide], [.5], 0
- }
- ' Draw the Door's Line
- >Line
- {
- <pointxyz [x1], [y1], 0
- <PointPolar [wide], 45, 0
- }
- ' Draw the Door's Arc
- >Arc
- {
- <Angle 45
- <Type 0
- <pointxyz [x1], [y1], 0
- <pointxyz [x1+wide],[y1], 0
- }
- ' Done
- End
-
-
-
-